package com.sxt.async;

import javax.annotation.Resource;

import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;


/**
 * 	实现在项目启动后执行的功能
 * @author Administrator
 *
 */
@Component
public class StartupRunner implements  CommandLineRunner {
	@Resource
    private AsyncTask asyncTask;
	@Override
	public void run(String... args) throws Exception {
		System.out.println(">>>>>>>>>>>>>>>服务启动执行，执行加载数据等操作<<<<<<<<<<<<<");
		asyncTask.task1();
		
		asyncTask.task2();
		
		asyncTask.task3();
		
	}

}
